home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group98c.txt / 000136_icon-group-sender _Thu Dec 17 11:19:34 1998.msg < prev    next >
Internet Message Format  |  2000-09-20  |  968b

  1. Return-Path: <icon-group-sender>
  2. Received: (from root@localhost)
  3.     by baskerville.CS.Arizona.EDU (8.9.1a/8.9.1) id LAA14165
  4.     for icon-group-addresses; Thu, 17 Dec 1998 11:17:54 -0700 (MST)
  5. Message-Id: <199812171817.LAA14165@baskerville.CS.Arizona.EDU>
  6. Date: Wed, 16 Dec 1998 18:21:05 -0700
  7. From: Ralph Griswold <ralph>
  8. To: icon-group
  9. Subject: Small Icon programming problem
  10. Errors-To: icon-group-errors@optima.CS.Arizona.EDU
  11. Status: RO
  12.  
  13. Here's a small Icon programming problem for you to tackle:
  14.  
  15.     Write a procedure digsort(i) that returns the integer that
  16.     results from sorting the digits of i, preserving sign.  For
  17.     example, digsort(201) should return 12 and digsort(-1042)
  18.     should return -124.  You may assume i is an integer.
  19.  
  20. You could aim for brevity, speed, and/or clarity.
  21.  
  22. Send solutions and comments to icon-group.  The most interesting
  23. solutions will appear in a future issue of the Icon Analyst and
  24. sent to icon-group as a package.
  25.